We report on Hubble Space Telescope observations of the optical transient discovered in the error box of GRB970508. The object was imaged on 1997 June 2 with the Space Telescope Imaging Spectrograph and Near-Infrared Camera and Multi-Object Spectrometer. The observations reveal a point-like source with R = 23.1 +- 0.2 and H = 20.6 +- 0.3, in agreement with the power-law temporal decay seen in previous ground-based monitoring. Unlike the case of GRB970228, no nebulosity is detected surrounding the OT of GRB970508, although Mg I absorption and [O II] emission seen in Keck spectra at a redshift of z = 0.835 suggest the presence of a dense, star-forming medium. The HST observations set very conservative upper limits of R ~24.5 and H ~22.2 on the brightness of any underlying extended source. If this subtends a substantial fraction of an arcsecond, then the R band limit is ~25.5. Subsequent photometry suggests a flattening of the light curve at later epochs. Assuming the OT decline follows a pure power-law and ascribing the flattening to the presence of an underlying component of constant flux, we find that this must have R = 25.4, consistent with the upper limits determined by HST. At z = 0.8, this would correspond to an absolute magnitude in the U band of ~-18, similar to that of the Large Magellanic Cloud. We propose a scenario in which the host galaxy of the GRB is of Magellanic type, possibly being a ``satellite'' of one of the bright galaxies located at few arcseconds from the optical transient.